<template>
    <div style="padding: 20px;">
      <div class="headerBoxList">
        <svg width="24" height="24" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 9C6 7.34315 7.34315 6 9 6H34.2814L42 13.2065V39C42 40.6569 40.6569 42 39 42H9C7.34315 42 6 40.6569 6 39V9Z" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path fill-rule="evenodd" clip-rule="evenodd" d="M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6" fill="none"/><path d="M24.0083 6L24 13.3846C24 13.7245 23.5523 14 23 14H15C14.4477 14 14 13.7245 14 13.3846L14 6H24.0083Z" stroke="#333" stroke-width="4" stroke-linejoin="round"/><path d="M9 6H34.2814" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 26H34" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M14 34H24.0083" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
        <span style="margin-left: 10px">存储信息 <span style="font-size: 15px;" v-if="total!==0">({{ total }}行)</span></span>
      </div>
        <div class="content">
          <p style="border-bottom: 1px solid #ebebeb;" v-for="(item,index) in list" :key="index">· {{ item }}</p>
        </div>
    </div>
  </template>
  
  <script>
import { getRxTmpPathApi } from '@/api/phoneInfo/index'
export default {
      name:'saveInfo',
      data(){
          return{
              list:[],
              total:0
          }
      },
      mounted(){
          this.init();
      },
      methods:{
      init(){
        let node = this.$route.params.nodeData.data;
        let dataJson = {
          "proof_num":node.proof_num,
          "rxTmpPath":'/'+node.subtype
        }
      getRxTmpPathApi(dataJson).then(res=>{
        if(!res.data)return
        const str = res.data;

        let arr = str.split("\n");
          this.list = arr;
          this.total = arr.length;
      }).catch(error=>{

      })
      }
  
      }
  
  }
  </script>
  
  <style scoped>
      .headerBoxList {
      width: 100%;
      height: 50px;
      border-bottom: 1px solid #d2d2d2;
      display: flex;
      align-items: center;
      font-size: 18px;
      font-weight: bold;
    }
    .content{
      height: 80vh;
      overflow-y: auto;
      padding-left:50px;
      margin-top: 20px;
  }
    @media screen and (min-width: 2360px) {
      .content{
      height:67vh;
      overflow-y: auto;
  
    }
    }
  </style>